3.886 \(\int \frac{d+e x}{x \left (a+b x+c x^2\right )} \, dx\)

Optimal. Leaf size=71 \[ \frac{(b d-2 a e) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{a \sqrt{b^2-4 a c}}-\frac{d \log \left (a+b x+c x^2\right )}{2 a}+\frac{d \log (x)}{a} \]

[Out]

((b*d - 2*a*e)*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(a*Sqrt[b^2 - 4*a*c]) + (
d*Log[x])/a - (d*Log[a + b*x + c*x^2])/(2*a)

_______________________________________________________________________________________

Rubi [A]  time = 0.191021, antiderivative size = 71, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.238 \[ \frac{(b d-2 a e) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{a \sqrt{b^2-4 a c}}-\frac{d \log \left (a+b x+c x^2\right )}{2 a}+\frac{d \log (x)}{a} \]

Antiderivative was successfully verified.

[In]  Int[(d + e*x)/(x*(a + b*x + c*x^2)),x]

[Out]

((b*d - 2*a*e)*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(a*Sqrt[b^2 - 4*a*c]) + (
d*Log[x])/a - (d*Log[a + b*x + c*x^2])/(2*a)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 25.9763, size = 65, normalized size = 0.92 \[ \frac{d \log{\left (x \right )}}{a} - \frac{d \log{\left (a + b x + c x^{2} \right )}}{2 a} - \frac{\left (2 a e - b d\right ) \operatorname{atanh}{\left (\frac{b + 2 c x}{\sqrt{- 4 a c + b^{2}}} \right )}}{a \sqrt{- 4 a c + b^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((e*x+d)/x/(c*x**2+b*x+a),x)

[Out]

d*log(x)/a - d*log(a + b*x + c*x**2)/(2*a) - (2*a*e - b*d)*atanh((b + 2*c*x)/sqr
t(-4*a*c + b**2))/(a*sqrt(-4*a*c + b**2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.221518, size = 71, normalized size = 1. \[ -\frac{\frac{2 (b d-2 a e) \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right )}{\sqrt{4 a c-b^2}}+d (\log (a+x (b+c x))-2 \log (x))}{2 a} \]

Antiderivative was successfully verified.

[In]  Integrate[(d + e*x)/(x*(a + b*x + c*x^2)),x]

[Out]

-((2*(b*d - 2*a*e)*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a*c] +
d*(-2*Log[x] + Log[a + x*(b + c*x)]))/(2*a)

_______________________________________________________________________________________

Maple [A]  time = 0.009, size = 100, normalized size = 1.4 \[{\frac{d\ln \left ( x \right ) }{a}}-{\frac{d\ln \left ( c{x}^{2}+bx+a \right ) }{2\,a}}+2\,{\frac{e}{\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }-{\frac{bd}{a}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((e*x+d)/x/(c*x^2+b*x+a),x)

[Out]

d*ln(x)/a-1/2*d*ln(c*x^2+b*x+a)/a+2/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^
2)^(1/2))*e-1/a/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*b*d

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x + d)/((c*x^2 + b*x + a)*x),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.344201, size = 1, normalized size = 0.01 \[ \left [-\frac{{\left (b d - 2 \, a e\right )} \log \left (-\frac{b^{3} - 4 \, a b c + 2 \,{\left (b^{2} c - 4 \, a c^{2}\right )} x -{\left (2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c\right )} \sqrt{b^{2} - 4 \, a c}}{c x^{2} + b x + a}\right ) + \sqrt{b^{2} - 4 \, a c}{\left (d \log \left (c x^{2} + b x + a\right ) - 2 \, d \log \left (x\right )\right )}}{2 \, \sqrt{b^{2} - 4 \, a c} a}, -\frac{2 \,{\left (b d - 2 \, a e\right )} \arctan \left (-\frac{\sqrt{-b^{2} + 4 \, a c}{\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) + \sqrt{-b^{2} + 4 \, a c}{\left (d \log \left (c x^{2} + b x + a\right ) - 2 \, d \log \left (x\right )\right )}}{2 \, \sqrt{-b^{2} + 4 \, a c} a}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x + d)/((c*x^2 + b*x + a)*x),x, algorithm="fricas")

[Out]

[-1/2*((b*d - 2*a*e)*log(-(b^3 - 4*a*b*c + 2*(b^2*c - 4*a*c^2)*x - (2*c^2*x^2 +
2*b*c*x + b^2 - 2*a*c)*sqrt(b^2 - 4*a*c))/(c*x^2 + b*x + a)) + sqrt(b^2 - 4*a*c)
*(d*log(c*x^2 + b*x + a) - 2*d*log(x)))/(sqrt(b^2 - 4*a*c)*a), -1/2*(2*(b*d - 2*
a*e)*arctan(-sqrt(-b^2 + 4*a*c)*(2*c*x + b)/(b^2 - 4*a*c)) + sqrt(-b^2 + 4*a*c)*
(d*log(c*x^2 + b*x + a) - 2*d*log(x)))/(sqrt(-b^2 + 4*a*c)*a)]

_______________________________________________________________________________________

Sympy [A]  time = 123.543, size = 1498, normalized size = 21.1 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x+d)/x/(c*x**2+b*x+a),x)

[Out]

(-d/(2*a) - sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2*a*(4*a*c - b**2)))*log(x + (-4*
a**4*b*c*e*(-d/(2*a) - sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2*a*(4*a*c - b**2)))**
2 - 24*a**4*c**2*d*(-d/(2*a) - sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2*a*(4*a*c - b
**2)))**2 + 4*a**4*c*e**2*(-d/(2*a) - sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2*a*(4*
a*c - b**2))) + a**3*b**3*e*(-d/(2*a) - sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2*a*(
4*a*c - b**2)))**2 + 14*a**3*b**2*c*d*(-d/(2*a) - sqrt(-4*a*c + b**2)*(2*a*e - b
*d)/(2*a*(4*a*c - b**2)))**2 - a**3*b**2*e**2*(-d/(2*a) - sqrt(-4*a*c + b**2)*(2
*a*e - b*d)/(2*a*(4*a*c - b**2))) - 8*a**3*b*c*d*e*(-d/(2*a) - sqrt(-4*a*c + b**
2)*(2*a*e - b*d)/(2*a*(4*a*c - b**2))) + 12*a**3*c**2*d**2*(-d/(2*a) - sqrt(-4*a
*c + b**2)*(2*a*e - b*d)/(2*a*(4*a*c - b**2))) - 4*a**3*c*d*e**2 - 2*a**2*b**4*d
*(-d/(2*a) - sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2*a*(4*a*c - b**2)))**2 + 2*a**2
*b**3*d*e*(-d/(2*a) - sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2*a*(4*a*c - b**2))) -
3*a**2*b**2*c*d**2*(-d/(2*a) - sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2*a*(4*a*c - b
**2))) + a**2*b**2*d*e**2 + 12*a**2*b*c*d**2*e + 12*a**2*c**2*d**3 - 3*a*b**3*d*
*2*e - 11*a*b**2*c*d**3 + 2*b**4*d**3)/(2*a**3*c*e**3 - 3*a**2*b*c*d*e**2 + 18*a
**2*c**2*d**2*e - 3*a*b**2*c*d**2*e - 9*a*b*c**2*d**3 + 2*b**3*c*d**3)) + (-d/(2
*a) + sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2*a*(4*a*c - b**2)))*log(x + (-4*a**4*b
*c*e*(-d/(2*a) + sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2*a*(4*a*c - b**2)))**2 - 24
*a**4*c**2*d*(-d/(2*a) + sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2*a*(4*a*c - b**2)))
**2 + 4*a**4*c*e**2*(-d/(2*a) + sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2*a*(4*a*c -
b**2))) + a**3*b**3*e*(-d/(2*a) + sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2*a*(4*a*c
- b**2)))**2 + 14*a**3*b**2*c*d*(-d/(2*a) + sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2
*a*(4*a*c - b**2)))**2 - a**3*b**2*e**2*(-d/(2*a) + sqrt(-4*a*c + b**2)*(2*a*e -
 b*d)/(2*a*(4*a*c - b**2))) - 8*a**3*b*c*d*e*(-d/(2*a) + sqrt(-4*a*c + b**2)*(2*
a*e - b*d)/(2*a*(4*a*c - b**2))) + 12*a**3*c**2*d**2*(-d/(2*a) + sqrt(-4*a*c + b
**2)*(2*a*e - b*d)/(2*a*(4*a*c - b**2))) - 4*a**3*c*d*e**2 - 2*a**2*b**4*d*(-d/(
2*a) + sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2*a*(4*a*c - b**2)))**2 + 2*a**2*b**3*
d*e*(-d/(2*a) + sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2*a*(4*a*c - b**2))) - 3*a**2
*b**2*c*d**2*(-d/(2*a) + sqrt(-4*a*c + b**2)*(2*a*e - b*d)/(2*a*(4*a*c - b**2)))
 + a**2*b**2*d*e**2 + 12*a**2*b*c*d**2*e + 12*a**2*c**2*d**3 - 3*a*b**3*d**2*e -
 11*a*b**2*c*d**3 + 2*b**4*d**3)/(2*a**3*c*e**3 - 3*a**2*b*c*d*e**2 + 18*a**2*c*
*2*d**2*e - 3*a*b**2*c*d**2*e - 9*a*b*c**2*d**3 + 2*b**3*c*d**3)) + d*log(x)/a

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.271536, size = 97, normalized size = 1.37 \[ -\frac{d{\rm ln}\left (c x^{2} + b x + a\right )}{2 \, a} + \frac{d{\rm ln}\left ({\left | x \right |}\right )}{a} - \frac{{\left (b d - 2 \, a e\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c} a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x + d)/((c*x^2 + b*x + a)*x),x, algorithm="giac")

[Out]

-1/2*d*ln(c*x^2 + b*x + a)/a + d*ln(abs(x))/a - (b*d - 2*a*e)*arctan((2*c*x + b)
/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*a)